import { BotApi, XinghanApi, plugin } from '../../model/api/api.js'
export class XinghanHelp extends plugin {
    constructor() {
        super(BotApi.SuperInex.getUser({
            rule: [
                {
                    reg: '^#星瀚(帮助|菜单|help|列表)$',
                    fnc: 'xhHelp'
                },
                {
                    reg: '^#星瀚管理$',
                    fnc: 'xhAdmin',
                }
            ]
        }))
    }
    async xhHelp(e) {
        const data = await BotApi.ImgHelp.getboxhelp({ name: 'help' })
        if (!data) {
            return
        }
        await e.reply(await BotApi.ImgCache.helpcache({ i: 1, data }))
    }
    async xhAdmin(e) {
        const data = await BotApi.ImgHelp.getboxhelp({ name: 'admin' })
        if (!data) {
            return
        }
        await e.reply(await BotApi.ImgCache.helpcache({ i: 0, data }))
    }
}